package models;

import java.util.*;
import javax.persistence.*;

import play.Logger;
import play.data.format.*;
import play.data.validation.*;

public class PaymentLoginForm extends SeatForm{

	@Constraints.Required
	@Formats.NonEmpty
	public String username;

	@Constraints.Required
	public String password;	

	@Override
	public String validate() {
		
		if(User.authenticate(username, password) == null) {
			return "Invalid user or password";
		}

		return super.validate();
	}


}

